package com.nidu.demo.notify.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.nidu.demo.base.BaseCmd;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Map;

/**
 * 站内信发送命令
 *
 * @author auto
 */
@Data
@Schema(description = "站内信发送命令")
@EqualsAndHashCode(callSuper = true)
public class NotifyMessageSendCmd extends BaseCmd {

    @NotNull(message = "用户ID不能为空")
    @Schema(description = "用户id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long userId;

    @NotBlank(message = "模板编码不能为空")
    @Schema(description = "模板编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "SYSTEM_NOTICE")
    private String templateCode;

    @Schema(description = "模版参数", example = "{\"username\":\"张三\"}")
    private Map<String, Object> templateParams;

}
